cc.Class({
    extends: cc.Component,

    properties: {
        assetManager: null,
        persistentPath: null,
    },

    onLoad: function () {
        if (cc.sys.isNative) {
            this.assetManager = new jsb.AssetManager();
            if (cc.sys.ENABLE_GC_FOR_NATIVE_OBJECTS == false) {
                this.assetManager.retain();
            }

        } else {
            this.enabled = false;
        }
    },

    onDestroy: function () {
        if (cc.sys.isNative) {
            if (cc.sys.ENABLE_GC_FOR_NATIVE_OBJECTS == false && this.assetManager) {
                this.assetManager.release();
            }
        }
    },

});
